package com.shop.cereshop.commons.domain.referral;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * 推广关系实体类
 * 对应表：cere_agent_referral_relations
 */
@Data
@ApiModel(value = "CereAgentReferralRelation", description = "推广关系实体类")
@TableName("cere_agent_referral_relation")
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class AgentReferralRelation {

  /**
   * 关系ID
   */
  @ApiModelProperty(value = "关系ID")
  @TableId(type = IdType.AUTO)
  private Long relationId;

  /**
   * 邀请人ID
   */
  @ApiModelProperty(value = "邀请人ID")
  private Long referrerId;

  /**
   * 被邀请人ID
   */
  @ApiModelProperty(value = "被邀请人ID")
  private Long refereeId;

  /**
   * 被邀请人角色类型 1-用户，2-商家，3-代理商，4-业务员，5-股东
   */
  @ApiModelProperty(value = "被邀请人角色类型 1-用户，2-商家，3-代理商，4-业务员，5-股东")
  private Integer refereeType;

  /**
   * 创建时间
   */
  @ApiModelProperty(value = "创建时间")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private LocalDateTime createTime;
}